#include <deviceOperateSN.h>

uint8_t deviceSnString[DEVICE_SERIAL_NUMBER_SIZE];

#define DEVICE_SN_PC_CHECK_SAVE_FILE "./deviceSnSave.txt"
void deviceSnReadFormHardware()
{
    memset(deviceSnString, 0, sizeof(deviceSnString));
    readLocalFile(DEVICE_SN_PC_CHECK_SAVE_FILE, (char *)deviceSnString, sizeof(deviceSnString));
    logdebug("read sn:%s", getMaxSizeHexStr(deviceSnString).byteStr);
}

void deviceSnSaveToHardware()
{
    writeLocalFile(DEVICE_SN_PC_CHECK_SAVE_FILE, (char *)deviceSnString, sizeof(deviceSnString));
    logdebug("save sn:%s", getMaxSizeHexStr(deviceSnString).byteStr);
}
